# 封装是面向对象的三大特性之一
# 封装指的是隐藏对象中一些不希望被外部所访问到的属性或方法

class Dog:
    def __init__(self,name ,age):
        self.hidder_name = name
        self.hidder_age = age

    def say_hello(self):
        print("我是%s" %self.hidder_name)


    def get_name(self):
        return self.hidder_name

    def set_name(self,name):
        self.hidder_name = name


d = Dog("zs",2)

d.set_name("小飞")
print(d.hidder_name)
print(d.get_name())